import 'package:flame/game.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../game_center_controller.dart';
import 'game1.dart';

class GameCenterPage1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetBuilder<GameCenterController>(
        init: GameCenterController(),
        builder: (controller) {
          return Scaffold(
            appBar: AppBar(
              title: Text('角色移动和旋转'),
              actions: [
                // TextButton(
                //     onPressed: () {
                //       controller.pause();
                //     },
                //     child: Text(
                //       '暂停',
                //       style: TextStyle(color: Colors.white),
                //     ))
              ],
            ),
            body: GameWidget(game: Game1()),
          );
        });
  }
}
